import Vue from 'vue'
import App from './App.vue'
import store from '@/store'
import '@/plugins'
import '@/utils/solution'
import '@/assets/styles/common.scss'
import { closeApp } from '@/utils/index'

import BetterScroll from '@/components/better-scroll/index'
// 注册全局组件
Vue.component('BetterScroll', BetterScroll)

// 调试
// import Vconsole from 'vconsole'
// let vConsole = new Vconsole()
// export default vConsole

Vue.config.productionTip = false

if (process.env.NODE_ENV === 'production') {
    window.apiready = () => {
        new Vue({
            store,
            render: h => h(App)
        }).$mount('#app')
        closeApp()
    }
} else {
    new Vue({
        store,
        render: h => h(App)
    }).$mount('#app')
}

import { request } from '@/utils/request'

//加载冻结数据
export function loadClothFreezeData(data, callback) {
    return request({
        url: "/grey_cloth_freeze/list",
        method: "get",
        data,
        isYarn: true
    }, callback);
}

//增加临活杂工配置
export function addGreyClothFreeze(data, callback) {
    return request({
        url: "/grey_cloth_freeze/add_by_cloth",
        method: "post",
        data,
        isFile: true,
        isYarn: true
    }, callback);
}

//删除临活杂工配置
export function delGreyClothFreeze(data, callback) {
    return request({
        url: "/grey_cloth_freeze/del",
        method: "post",
        data,
        isFile: true,
        isYarn: true
    }, callback);
}
